package com.future.bantang.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.future.bantang.R;
import com.future.bantang.app.BanTangAPP;
import com.future.bantang.entity.SearchCategoryListEntity;

/**
 * Created by zzh on 2016/1/17.
 * 搜索界面 单品 二级列表
 */
public class FraSearchSingleProductSubListAdapter extends AbsBaseAdapter<SearchCategoryListEntity.DataEntity.SubclassEntity>{

    public FraSearchSingleProductSubListAdapter(Context context) {
        super(context, R.layout.fragment_search_single_product_category_sub_item);
    }

    @Override
    public void bindDatas(ViewHolder viewHolder, SearchCategoryListEntity.DataEntity.SubclassEntity data) {
        ImageView imageView = (ImageView) viewHolder.getView(R.id.img_fra_search_single_product_category_sub_item_ico);
        BanTangAPP.getApp().getImageLoader().displayImage(data.getIcon(),imageView);

        ((TextView)viewHolder.getView(R.id.txt_fra_search_single_product_category_sub_item_title)).setText(data.getName());

    }
}
